package org.feiye.studyday07;

import java.util.Scanner;

public class Two {

	public static void main(String[] args) {
		//
		double[] costs = new double[5];
		double sum = 0;
		System.out.println("请输入会员本月的消费记录");
		Scanner sc = new Scanner(System.in);

		for (int i = 0; i < costs.length; i++) {
			System.out.print("请输入第" + (i + 1) + "笔购物金额：");
			costs[i] = sc.nextDouble();
		}
		System.out.println();
		System.out.println("序号" + "\t\t" + "金额（元）");
		for (int i = 0; i < costs.length; i++) {
			System.out.println((i + 1) + "\t\t" + costs[i]);
			sum += costs[i];
		}
		System.out.println("总金额" + "\t\t" + sum);
	}

}
